package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AdminUserMsgRecordMapper;
import com.ruoyi.system.domain.AdminUserMsgRecord;
import com.ruoyi.system.service.IAdminUserMsgRecordService;

/**
 * 用户消息记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-11-06
 */
@Service
public class AdminUserMsgRecordServiceImpl implements IAdminUserMsgRecordService 
{
    @Autowired
    private AdminUserMsgRecordMapper adminUserMsgRecordMapper;

    /**
     * 查询用户消息记录
     * 
     * @param id 用户消息记录ID
     * @return 用户消息记录
     */
    @Override
    public AdminUserMsgRecord selectAdminUserMsgRecordById(Long id)
    {
        return adminUserMsgRecordMapper.selectAdminUserMsgRecordById(id);
    }

    /**
     * 查询用户消息记录列表
     * 
     * @param adminUserMsgRecord 用户消息记录
     * @return 用户消息记录
     */
    @Override
    public List<AdminUserMsgRecord> selectAdminUserMsgRecordList(AdminUserMsgRecord adminUserMsgRecord)
    {
        return adminUserMsgRecordMapper.selectAdminUserMsgRecordList(adminUserMsgRecord);
    }

    @Override
    public List<AdminUserMsgRecord> selectAdminUserMsgRecordListForAdmin(AdminUserMsgRecord adminUserMsgRecord) {
        return adminUserMsgRecordMapper.selectAdminUserMsgRecordListForAdmin(adminUserMsgRecord);
    }

    /**
     * 新增用户消息记录
     * 
     * @param adminUserMsgRecord 用户消息记录
     * @return 结果
     */
    @Override
    public int insertAdminUserMsgRecord(AdminUserMsgRecord adminUserMsgRecord)
    {
        adminUserMsgRecord.setCreateTime(DateUtils.getNowDate());
        return adminUserMsgRecordMapper.insertAdminUserMsgRecord(adminUserMsgRecord);
    }

    /**
     * 修改用户消息记录
     * 
     * @param adminUserMsgRecord 用户消息记录
     * @return 结果
     */
    @Override
    public int updateAdminUserMsgRecord(AdminUserMsgRecord adminUserMsgRecord)
    {
        adminUserMsgRecord.setUpdateTime(DateUtils.getNowDate());
        return adminUserMsgRecordMapper.updateAdminUserMsgRecord(adminUserMsgRecord);
    }

    /**
     * 批量删除用户消息记录
     * 
     * @param ids 需要删除的用户消息记录ID
     * @return 结果
     */
    @Override
    public int deleteAdminUserMsgRecordByIds(Long[] ids)
    {
        return adminUserMsgRecordMapper.deleteAdminUserMsgRecordByIds(ids);
    }

    /**
     * 删除用户消息记录信息
     * 
     * @param id 用户消息记录ID
     * @return 结果
     */
    @Override
    public int deleteAdminUserMsgRecordById(Long id)
    {
        return adminUserMsgRecordMapper.deleteAdminUserMsgRecordById(id);
    }
}
